{include file='public/meta' /}

<title>添加管理员 - 管理员管理</title>
</head>
<body>
<article class="cl pd-20" >
	<form action="" method="post" class="form form-horizontal" id="form-admin-add">
        <div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>厂家名称：</label>
			<div class="formControls col-xs-5 col-sm-4">
				<input type="text" class="input-text" value="" placeholder="" id="oem" name="oem">
			</div>
            <input class="btn btn-primary radius" type="button" value="&nbsp;&nbsp;提交&nbsp;&nbsp;" id="submit">
            <font id = "mes" style="position:relative;left: 10px;color: red;"></font>
		</div>
	</form>
</article>

{include file="public/footer" /}
<script type="text/javascript">

$(function(){
	$("#oem").blur(function(){
            $.ajax({
                type: 'GET',
                url: "checkOemName",
               	data:{name:$(this).val()},
                dataType: 'json',
                success: function(data){
                    $("#mes").text(data.message);
                }
            });
        });

    $("#submit").click(function(){
        $.ajax({
            type: "POST",
            url: "{:url('car/addOem')}",
            data: $("#form-admin-add").serialize(),
            dataType: "json",
            success: function(data){
                alert(data.message);
            }
        });
    });
	
});
</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>